﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Optimization;
using Enferno.Public.Web.Bundling;

namespace Enferno.Public.Web.ShoppingBasket
{
    public class ShoppingBasketBundler : BundlerBase
    {
        public ShoppingBasketBundler() : base("~/ShoppingBasketBundle") {}

        public ShoppingBasketBundler(string bundlePath): base(bundlePath) {}

        protected override Bundle SetupBundle(Bundle bundle)
        {
            if (Debug)
            {
                bundle.Include(new[]
                {
                    "~/jquery-2.1.1-js",
                    "~/Scripts/linq.js",
                    "~/Scripts/Basket/Promotion.js",
                    "~/Scripts/Basket/Basket.js",
                    "~/Scripts/knockout-2.2.1.debug.js",
                    "~/Scripts/knockout.mapping-latest.debug.js"
                });
            }
            else
            {
                bundle.Include(new[]
                {
                    "~/jquery-2.1.1-js",
                    "~/Scripts/linq.js",
                    "~/Scripts/Basket/Promotion.js",
                    "~/Scripts/Basket/Basket.js",
                    "~/Scripts/knockout-2.2.1.js",
                    "~/Scripts/knockout.mapping-latest.js"
                });
            }

            return bundle;
        }
    }
}
